package com.ruoyi.service.impl;

import com.ruoyi.domain.BasisEquipmentInformationv;
import com.ruoyi.dto.BasisPositionEquipment;
import com.ruoyi.mapper.BasisEquipmentInformationvMapper;
import com.ruoyi.service.IBasisEquipmentInformationvService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.domain.ReturnDate;

import java.util.List;
import java.util.Map;

/**
 * 装备信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-24
 */
@Service
public class BasisEquipmentInformationvServiceImpl implements IBasisEquipmentInformationvService 
{
    @Autowired
    private BasisEquipmentInformationvMapper basisEquipmentInformationvMapper;

    /**
     * 查询装备信息
     * 
     * @param id 装备信息主键
     * @return 装备信息
     */
    @Override
    public BasisEquipmentInformationv selectBasisEquipmentInformationvById(Long id)
    {
        return basisEquipmentInformationvMapper.selectBasisEquipmentInformationvById(id);
    }

    /**
     * 查询装备信息列表
     * 
     * @param basisEquipmentInformationv 装备信息
     * @return 装备信息
     */
    @Override
    public List<BasisEquipmentInformationv> selectBasisEquipmentInformationvList(BasisEquipmentInformationv basisEquipmentInformationv)
    {
        return basisEquipmentInformationvMapper.selectBasisEquipmentInformationvList(basisEquipmentInformationv);
    }

    /**
     * 新增装备信息
     * 
     * @param basisEquipmentInformationv 装备信息
     * @return 结果
     */
    @Override
    public int insertBasisEquipmentInformationv(BasisEquipmentInformationv basisEquipmentInformationv)
    {
        return basisEquipmentInformationvMapper.insertBasisEquipmentInformationv(basisEquipmentInformationv);
    }

    /**
     * 修改装备信息
     * 
     * @param basisEquipmentInformationv 装备信息
     * @return 结果
     */
    @Override
    public int updateBasisEquipmentInformationv(BasisEquipmentInformationv basisEquipmentInformationv)
    {
        return basisEquipmentInformationvMapper.updateBasisEquipmentInformationv(basisEquipmentInformationv);
    }

    /**
     * 批量删除装备信息
     * 
     * @param ids 需要删除的装备信息主键
     * @return 结果
     */
    @Override
    public int deleteBasisEquipmentInformationvByIds(Long[] ids)
    {
        return basisEquipmentInformationvMapper.deleteBasisEquipmentInformationvByIds(ids);
    }

    /**
     * 删除装备信息信息
     * 
     * @param id 装备信息主键
     * @return 结果
     */
    @Override
    public int deleteBasisEquipmentInformationvById(Long id)
    {
        return basisEquipmentInformationvMapper.deleteBasisEquipmentInformationvById(id);
    }

    @Override
    public List<ReturnDate> queryType(Long id) {
        return basisEquipmentInformationvMapper.queryType(id);
    }

    @Override
    public List<BasisEquipmentInformationv> findByEquipmentTypeEquipmentModel(String equipmentType, String equipmentModel,String loadingId,Integer positionId) {
        return basisEquipmentInformationvMapper.findByEquipmentTypeEquipmentModel(equipmentType, equipmentModel,loadingId,positionId);
    }

    @Override
    public boolean addBasisPositionEquipment(BasisPositionEquipment basisPositionEquipment) {
        return basisEquipmentInformationvMapper.addBasisPositionEquipment(basisPositionEquipment);
    }

    @Override
    public List<BasisEquipmentInformationv> findByPositionIdType(Integer positionId, String loadingId) {
        return basisEquipmentInformationvMapper.findByPositionIdType(positionId, loadingId);
    }

    @Override
    public boolean delBasisPositionEquipmentInformationv(String loadingId, Integer positionId) {
        return basisEquipmentInformationvMapper.delBasisPositionEquipmentInformationv(loadingId, positionId);
    }

    @Override
    public boolean delBasisPositionEquipmentInformationvEqid(String loadingId, Integer positionId, Integer eqId) {
        return basisEquipmentInformationvMapper.delBasisPositionEquipmentInformationvEqid(loadingId, positionId, eqId);
    }

    @Override
    public List<BasisEquipmentInformationv> findbyloadingIdpositionIduserId(String loadingId, Integer positionId, Integer userId) {
        return basisEquipmentInformationvMapper.findbyloadingIdpositionIduserId(loadingId,positionId,userId);
    }

    @Override
    public Integer selectLoadingIdAndEqId(String loadingId, Integer eqId) {
        return basisEquipmentInformationvMapper.selectLoadingIdAndEqId(loadingId, eqId);
    }
}
